<div id="sub_nav">
      <p>Quick Links:</p>
      <ul>
        <li><a href="javascript:void(0);" controller="groups" action="add"
            title="Add"
            onclick='showPop(this)'>Add New Group</a></li>
       
      </ul>
    </div>
<div class="breadcrumb">
    <ul id="breadcrumb">
        <li><a href="<?php echo Configure::read('base_url');?>backstage" title="Home">
		<?php echo $this->Html->image("home.png", array("alt" => "Home",'class'=>'home','border'=>'0'));?>
		</a></li>
        <li><a href="<?php echo Configure::read('base_url');?>backstage/groups" title="Manage Admin">Manage Groups</a></li>
        
    </ul>
</div>
<?php echo $this->element('admin/admin_leftmenu'); ?>
<div id="left"> 
    <?php
    echo $this->Session->flash();
    if ($this->Session->check('Message.auth'))
        echo $this->Session->flash('auth');
    ?>
    <div class="div_header"><?php __('Manage Groups'); ?></div>
    <div class="div_content">
           <table id="category_table" cellspacing="0" class="tablesorter">
            <thead>
                <tr>
                    <th width="50" style="text-align:center;"><?php echo _('id'); ?></th>
                    <th width="120" style="text-align:center;"><?php echo _('Name'); ?></th>
                    <th width="120" style="text-align:center;"><?php echo _('Group Type'); ?></th>
                    <th width="70"  style="text-align:center;">Actions</th>

                </tr>
            </thead>
            <tbody>
                <?php
                $i = 0;
                //pr($category);
                foreach ($groups as $group):
                    $class = null;
                    if ($i++ % 2 == 0) :
                        $class = ' class="alt"';
                ?>
                        <tr>
                            <td class="alt"  align="center"><?php echo $i; ?></td>
                            <td class="alt"  align="center">
                            <?php echo $group['Group']['name']; ?>
                            
                            </td>
                            <td class="alt"  align="center">
                <?php
/*
                if($group['Group']['group_type']==1)
                    echo 'Sadmin';
                if($group['Group']['group_type']==2)
                    echo 'Qadmin';
                if($group['Group']['group_type']==3)
                    echo 'Seller';
                if($group['Group']['group_type']==4)
                    echo 'Buyer';*/
                echo $group['Group']['group_type'];
                ?>
                    </td>
                    <td align="center" class="alt">
                       
                        <a href="javascript:void(0);" controller="groups" action="edit" title="Edit" ElmID="<?php echo $group['Group']['id']; ?>" onclick='showPop(this)'>
<?php echo $this->Html->image("edit_gray.png", array("alt" => "Edit", 'border' => '0')); ?>
                        </a>&nbsp;&nbsp;
                       
                    </td>

                </tr>
<?php else: ?>
                            <tr>
                                <td  align="center"><?php echo $i; ?></td>
                            <td  align="center">
                            <?php echo $group['Group']['name']; ?>
                            
                            </td>
                            <td  align="center">
                <?php /* if($group['Group']['group_type']==1)
                    echo 'Sadmin';
                if($group['Group']['group_type']==2)
                    echo 'Qadmin';
                if($group['Group']['group_type']==3)
                    echo 'Seller';
                if($group['Group']['group_type']==4)
                    echo 'Buyer';*/
                echo $group['Group']['group_type'];
                ?>
                    </td>
                    <td align="center"  align="center">

                        <a href="javascript:void(0);" controller="groups" action="edit" title="Edit" ElmID="<?php echo $group['Group']['id']; ?>" onclick='showPop(this)'>
<?php echo $this->Html->image("edit_yellow.png", array("alt" => "Edit", 'border' => '0')); ?>
                        </a>&nbsp;&nbsp;

                    </td>

                </tr>
<?php endif;
                        endforeach; ?>
                    <tbody>
                </table>
        <div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
            </div>
            <div class="div_bottom"></div>
        </div>

        <!-- edit sidebar items here -->

<!--        </div>-->
<?php
                       // echo $this->Html->css('table_css');
?>  

<?php echo $html->script(array("jquery.pagination.js", "jquery.tablesorter.min.js", "jquery.tablednd.js")); ?>
<script type="text/javascript"> 
 
    jQuery(document).ready(function(){
        jQuery("#category_table").tablesorter({headers: {3:{sorter: false}, 5:{sorter: false}}});
    });
</script>